import tensorflow as tf

with tf.name_scope("a"):
    input1 = tf.constant([1.0, 2.0, 3.0], name='input1')
with tf.name_scope("b"):
    input2 = tf.Variable(tf.random_uniform([3]), name='input2')
add = tf.add_n([input1, input2], name='addOP')

with tf.Session() as sess:
    sess.run(tf.global_variables_initializer())
    writer = tf.summary.FileWriter("./logs/tensorboard2",sess.graph)
    print(sess.run(add))
writer.close()
